﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MySkiPatrolSite.AdminSvc.Patrol>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Members
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Members</h2>
    <div style="font-size:15px;">
        <a href="#a">A</a> |
        <a href="#b">B</a> |
        <a href="#c">C</a> |
        <a href="#d">D</a> |
        <a href="#e">E</a> |
        <a href="#f">F</a> |
        <a href="#g">G</a> |
        <a href="#h">H</a> |
        <a href="#i">I</a> |
        <a href="#j">J</a> |
        <a href="#k">K</a> |
        <a href="#l">L</a> |
        <a href="#m">M</a> |
        <a href="#n">N</a> |
        <a href="#o">O</a> |
        <a href="#p">P</a> |
        <a href="#q">Q</a> |
        <a href="#r">R</a> |
        <a href="#s">S</a> |
        <a href="#t">T</a> |
        <a href="#u">U</a> |
        <a href="#v">V</a> |
        <a href="#w">W</a> |
        <a href="#x">X</a> |
        <a href="#y">Y</a> |
        <a href="#z">Z</a> 
        </div><br /><br />

         <%: Html.ActionLink("Create New Member", "MemberNew")%>

    <div style="width: 100%;height: 500px;overflow: scroll;">

        <br /><br />
        
    <table>
        <tr>
            <th>
                Name
            </th>
            <th>
                NSPNumber
            </th>
        </tr>

    <% string currentChar = "";
        foreach (var item in Model.Members) { %>
    
        <tr>
            <%if (currentChar.ToUpper() != item.FullName.Substring(0, 1))
              {%>
            <td id="<%:item.FullName.Substring(0,1) %>">
            <% currentChar = item.FullName.Substring(0, 1);
              } else { %>
              <td>
              <%} %>
            <%: MySkiPatrolSite.HtmlHelpers.ActionImage(Html, @"MemberDetails/" + item.ID, null, "~/Images/DryIcons/Shine/png/24x24/business_user_info.png", "Member Details", "")%>
                <%//: MySkiPatrolSite.HtmlHelpers.ActionImage(Html, @"MemberDelete/" + item.ID, null, "~/Images/DryIcons/Shine/png/24x24/business_user_delete.png", "Delete This Member", "")%>
            <%: Html.ActionLink(item.FullName, "MemberDetails", new { id = item.ID })%>
                
            </td>
            <td>
                <%: item.NSPNumber %>
            </td>
        </tr>
    
    <% } %>

    </table>


    </div>
</asp:Content>
